# Replication Package for "A new scientometric database of scientific publications in Brazilian International Relations Journals (1997-2021)"

The code in this replication package constructs the tables and figures for "A new scientometric database of scientific publications in Brazilian International Relations Journals (1997-2021)". There are two main directories for conducting the analysis, `R/data-prep`, for the raw data pre-processing and `R/analysis`, for the data analysis.

## Data Availability and Provenance Statements

All data was collected via web scraping from each journal web page using code from the package [irjournalsbr](https://github.com/pedrodrocha/irjournalsbr) developed by the author.

All code is licensed under a Creative Commons
[CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/) license.

### Summary of Availability
 
 All data is publicly available.

### Details on Data Source

`raw_data/raw_data.csv`: The data used to support the findings of this study comes from each journals web page. The data was collected by the authors using web scraping, and is available under a Creative Commons Non-commercial license. Code for updating, cleaning, prepping, and analysing the data is provided as part of the replication package. 

## Software Requirements

The whole analysis was run in R version 4.1.2 (2021-11-01) in the platform x86_64-w64-mingw32/x64 (64-bit). The following R packages are required: `readr`, `dplyr`, `stringr`, `stringi`, `purrr`, `textcat`, `genderBR`,`tidyr`, `ggplot2`, `pdftools`,`here`, `cowplot`, `visdat`, `naniar`, `tibble`, and other `tidyverse` packages.


## Description of programs/code

- `R/data-prep/01.R`: initial data cleaning.  
- `R/data-prep/02.R`: full institution affiliation (OG) cleaning.
- `R/data-prep/03.R`: final cleaning process and gender and language imputation.
- `R/analysis/figure-01.R`: code for figure 01.
- `R/analysis/figure-02.R`: code for figure 02.
- `R/analysis/figure-03.R`: code for figure 03.
- `R/analysis/figure-04.R`: code for figure 04.
- `R/analysis/figure-05.R`: code for figure 05.
- `R/analysis/figure-06.R`: code for figure 06.
- `R/analysis/table-content.R`: code for table 01.
- `R/analysis/tables-missingness.R`: code for tables 03 and 04.
- `R/analysis/table-coauthorship.R`: code for table 05.
- `R/analysis/table-endogeneity.R`: code for table 06.
- `R/analysis/table-keywords.R`: code for table 07.



## List of figures, tables and scripts

| Figure/Table #    | Program                                         |Output file                               |                 
|-------------------|-------------------------------------------------|------------------------------------------|
| Table 01          | R/analysis/table-content.R                      | n.a.                                     | 
| Table 02          | n.a.                                            | n.a.                                     | 
| Table 03          | R/analysis/tables-missingness.R                 | n.a.                                     | 
| Table 04          | R/analysis/tables-missingness.R                 | n.a.                                     |  
| Table 05          | R/analysis/table-coauthorship.R                 | n.a.                                     |          
| Table 06          | R/analysis/table-endogeneity.R                  | n.a.                                     |    
| Table 07          | R/analysis/table-keywords.R                     | n.a.                                     | 
| Figure 01         | R/analysis/figure-01.R                          | output/figure-01.jpeg                    | 
| Figure 02         | R/analysis/figure-02.R                          | output/figure-02.jpeg                    | 
| Figure 03         | R/analysis/figure-03.R                          | output/figure-03.jpeg                    | 
| Figure 04         | R/analysis/figure-04.R                          | output/figure-04.jpeg                    | 
| Figure 05         | R/analysis/figure-05.R                          | output/figure-05.jpeg                    |          
| Figure 06         | R/analysis/figure-06.R                          | output/figure-06.jpeg                    |   



